<template>
  <div class="checkbox" :style="{'height':data.height*40 + (data.height-1)*8 + 'px'}">
    <div class="name" :style="{'line-height':data.height*40 + (data.height-1)*8 + 'px'}">复选框 :</div>
    <el-checkbox-group v-model="checkList" :style="{'margin-top':(data.height*40 + (data.height-1)*8 -30)/2 - 5 + 'px'}">
      <el-checkbox label="复选A"></el-checkbox>
      <el-checkbox label="复选B"></el-checkbox>
      <el-checkbox label="复选C"></el-checkbox>
    </el-checkbox-group>
  </div>
</template>
<script>
export default {
  props: {
    data: {
      type: Object
    }
  },
  data() {
    return {
      checkList: ['复选A']
    }
  },
  computed: {},
  methods: {


  },
  mounted() {}
}

</script>
<style lang="less">
.checkbox {
  width: 100%;
  height: 100%;
  display: flex;
  border: 1px dashed #000;
  box-sizing: border-box;
  border-radius: 6px;
  height: 40px;
  line-height: 38px;
  .name {
    padding: 0 10px;
    white-space: nowrap;
  }
  .el-checkbox-group {
    flex: 1;
    display: flex;
    overflow: hidden;
    .el-checkbox{
      flex:1;
      margin-left: 5px;
      &:first-child{
        margin-left: 0;
      }
    }
  }
}

</style>
